//
//  GradesModel.m
//  WanCaiC8
//
//  Created by tangang on 2018/4/27.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "GradesModel.h"

@implementation GradesModel
- (void)setBettingRecord:(NSArray *)BettingRecord{
    _BettingRecord=[BetModel mj_objectArrayWithKeyValuesArray:BettingRecord];
}
@end

@implementation GradesLotteryNumModel
- (void)setNum:(NSString *)Num{
    _Num=Num;
    _NumArr=[Num componentsSeparatedByString:@","];
    NSInteger count=0;
    for (int i=0; i<_NumArr.count; i++) {
        [self.PCArr addObject:_NumArr[i]];
        count+=[_NumArr[i] integerValue];
        [self.PCArr addObject:@"+"];
    }
    [self.PCArr replaceObjectAtIndex:self.PCArr.count-1 withObject:@"="];
    
    [self.PCArr addObject:[NSString stringWithFormat:@"%ld",count]];
    
    [self.LotteryArr addObjectsFromArray:_NumArr];
    [self.LotteryArr insertObject:@"+" atIndex:_NumArr.count-1];
}

- (void)setNumAlias:(NSString *)NumAlias{
    _NumAlias=NumAlias;
    _NumAliasArr=[NumAlias componentsSeparatedByString:@","];
}

- (NSMutableArray *)PCArr{
    if (!_PCArr) {
        _PCArr=[[NSMutableArray alloc]init];
    }
    return _PCArr;
}

- (NSMutableArray *)LotteryArr{
    if (!_LotteryArr) {
        _LotteryArr=[[NSMutableArray alloc]init];
    }
    return _LotteryArr;
}

@end
